<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of OrderStatusController
 *
 * @author LeVinh
 */
include_once APPLICATION_PATH."/models/Order_Status.php";
class Admin_OrderstatusController extends Zend_Controller_Action {
    //put your code here
    public function init() {
        $bootstrap = $this->getInvokeArg("bootstrap");
        $this->aConfig = $bootstrap->getOptions();
        $this->view->aConfig = $this->aConfig;
        $this->model = new Model_Order_Status();
        $this->modelMapper = new Model_Order_StatusMapper();
    }
    public function indexAction() {
        
    }        
    public function serviceAction(){        
        $this->_helper->layout->disableLayout();            
        foreach ($this->modelMapper->fetchAll() as $items ) 
        {                                        
                $menber[]=array(
                    'id'=>$items->getId(),
                    'name'=>$items->getName(),                                   
                    'order'=>$items->getOrder()                   
                ); 
        }                    
        echo json_encode($menber);
        exit();
    }        
}
